<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<div class="sf_admin_form">
  <?php echo form_tag_for($form, '@bb_persona') ?>
    <?php $display = $configuration->getShowDisplay() ?>
    
    <?php foreach ($display as $fieldset => $field_names): ?>
      <fieldset id="sf_fieldset_<?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($fieldset)) ?>" style="background-color: #eee; border-width: 0;">
      <?php if ('NONE' != $fieldset): ?>
        <h2><?php echo __($fieldset, array(), 'messages') ?></h2>
      <?php endif; ?>
      
      <?php $decorator_format = explode("%content%", $form->getWidgetSchema()->getFormFormatter()->getDecoratorFormat()) ?>
      <?php echo $decorator_format[0] ?>
      
      <?php foreach ($field_names as $field): ?>
        <?php include_partial('bb_persona/show_form_field', array('BbPersona' => $BbPersona, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper, 'field' => $field)) ?>
      <?php endforeach ?>
      
      <?php echo $decorator_format[1] ?>
      <?php include_partial('bb_persona/direccion', array('BbPersona' => $BbPersona)) ?>
      </fieldset>
    <?php endforeach ?>

    <?php include_partial('bb_persona/show_form_actions', array('BbPersona' => $BbPersona, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
    
  </form>
</div>
